﻿using Outpatient.Doman.Hospitalization;
using Outpatient.ErrorCode;
using OutpatientApi.DTO;

namespace OutpatientApi.Methodimplementation.IServices
{
    /// <summary>
    /// 住院管理实体接口
    /// </summary>
    public interface IInpatientManagement
    {
        /// <summary>
        /// 批量添加病房
        /// </summary>
        /// <param name="batchAddDto">批量添加病房参数</param>
        /// <returns>批量添加结果</returns>
        Task<ApiResult<List<int>>> BatchAddRoomsAsync(BatchAddRoomDto batchAddDto);

        /// <summary>
        /// 添加单个病房
        /// </summary>
        /// <param name="addDto">添加病房参数</param>
        /// <returns>添加结果</returns>
        Task<ApiResult<int>> AddRoomAsync(AddRoomDto addDto);

        /// <summary>
        /// 查找病房类型信息
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<List<RoomType>>> GetRoomType();

        /// <summary>
        /// 查找病床号类型信息
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<List<HospitalBed>>> GetHospitalBed();

        /// <summary>
        /// 查找房间号
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<List<RoomDataDto>>> SearchRoomData();

        /// <summary>
        /// 添加患者住院登记
        /// </summary>
        /// <param name="addDto">添加患者住院登记参数</param>
        /// <returns>添加结果</returns>
        Task<ApiResult<int>> AddPatientAdmissionAsync(AddPatientAdmissionDto addDto);

        /// <summary>
        /// 查询患者住院登记列表（包含关联表信息）
        /// </summary>
        /// <param name="roomNumber">房间号（可选）</param>
        /// <returns>查询结果</returns>
        Task<ApiResult<List<PatientAdmissionDto>>> GetPatientAdmissionListAsync(string? roomNumber = null);

        /// <summary>
        /// 查找Room表数据（包含关联表信息）
        /// </summary>
        /// <returns>查询结果</returns>
        Task<ApiResult<List<RoomDetailDto>>> GetRoomListAsync();


        /// <summary>
        /// 实现病人查找功能
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult<List<SearchregistrationDto>>> GetPatientAdmission(GetPatientAdmissionDto dto);

        /// <summary>
        /// 实现付款查操作
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult<List<FeeDTO>>> GetFee(GetFeeDto dto);

        /// <summary>
        /// 查找Medicine表信息
        /// </summary>
        /// <param name="dto">查询条件</param>
        /// <returns>药品信息列表</returns>
        Task<ApiResult<List<MedicineDto>>> GetMedicine(GetMedicineDto dto);

        /// <summary>
        /// 查找病人查找
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult<List<SearchregistrationresultsDto>>> Search_discharge_results(GetPatientAdmissiondischargeDto dto);

        /// <summary>
        /// 提交出院实现
        /// </summary>
        /// <returns></returns>
        Task<ApiResult> Submit_discharge(Submit_dischargeDto dto);
    }
}
